/* SPDX-FileCopyrightText: © 2022-2024 Decompollaborate */
/* SPDX-License-Identifier: MIT */

/*
    31--------26-25------21 ----------------------------------------0
    |  = COP0   |   fmt   |                                         |
    ------6----------5-----------------------------------------------
    |--000--|--001--|--010--|--011--|--100--|--101--|--110--|--111--| lo
 00 | MFC2  | ---   | CFC2  | ---   | MTC2  | ---   | CTC2  | ---   |
 01 | ---   | ---   | ---   | ---   | ---   | ---   | ---   | ---   |
 10 | ---   | ---   | ---   | ---   | ---   | ---   | ---   | ---   |
 11 | ---   | ---   | ---   | ---   | ---   | ---   | ---   | ---   |
 hi |-------|-------|-------|-------|-------|-------|-------|-------|
*/

    // OP rt, cop2cd
    RABBITIZER_DEF_INSTR_ID(
        cpu, 0x00, mfc2,
        .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_cop2cd},
        .modifiesRt=true
    )
    RABBITIZER_DEF_INSTR_ID(
        cpu, 0x04, mtc2,
        .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_cop2cd},
        .readsRt=true
    )

    // OP rt, cop2cd
    RABBITIZER_DEF_INSTR_ID(
        cpu, 0x02, cfc2,
        .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_cop2cd},
        .modifiesRt=true
    )
    RABBITIZER_DEF_INSTR_ID(
        cpu, 0x06, ctc2,
        .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_cop2cd},
        .readsRt=true
    )
